home *** CD-ROM | disk | FTP | other *** search
- Path: newshost.lanl.gov!tanmoy
- From: tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya)
- Newsgroups: comp.lang.c
- Subject: Re: Basic Question on SWITCH
- Date: 26 Jan 1996 23:23:46 GMT
- Organization: Los Alamos National Laboratory
- Message-ID: <TANMOY.96Jan26162346@qcd.lanl.gov>
- References: <4e4cu4$95f@vixen.cso.uiuc.edu> <4e8p6m$n8q@ns.RezoNet.NET>
- <3108ED49.987@cmt.lpr.mail.carel.fi>
- NNTP-Posting-Host: qcd.lanl.gov
- Mime-Version: 1.0
- Content-Type: text
- In-reply-to: Ari Lukumies's message of Fri, 26 Jan 1996 17:03:37 +0200
-
- In article <3108ED49.987@cmt.lpr.mail.carel.fi> Ari Lukumies
- <aril@cmt.lpr.mail.carel.fi> writes:
- <snip>
- if (strchr("0123456789", a))
- ... /* It was a digit, do something */
-
- A special case for digits:
-
- if ((unsigned)(a-'0')<10)
- /* It _is_ a digit, do something */
-
- But then what is wrong with isdigit?
-
- Cheers
- Tanmoy
- --
- tanmoy@qcd.lanl.gov(128.165.23.46) DECNET: BETA::"tanmoy@lanl.gov"(1.218=1242)
- Tanmoy Bhattacharya O:T-8(MS B285)LANL,NM87545 H:#9,3000,Trinity Drive,NM87544
- Others see <gopher://yaleinfo.yale.edu:7700/00/Internet-People/internet-mail>,
- <http://alpha.acast.nova.edu/cgi-bin/inmgq.pl>or<ftp://csd4.csd.uwm.edu/pub/
- internetwork-mail-guide>. -- <http://nqcd.lanl.gov/people/tanmoy/tanmoy.html>
- fax: 1 (505) 665 3003 voice: 1 (505) 665 4733 [ Home: 1 (505) 662 5596 ]
-